package com.wanmait.baohan.service.Impl;


import com.github.pagehelper.PageInfo;
import com.wanmait.baohan.mapper.DictionaryMapper;
import com.wanmait.baohan.mapper.SupplierMapper;
import com.wanmait.baohan.pojo.Dictionary;
import com.wanmait.baohan.pojo.Supplier;
import com.wanmait.baohan.service.SuppilerService;
import com.wanmait.baohan.vo.DataVo;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * TODO
 *
 * @author 打豆豆
 * @version 1.0
 * @date 2020/12/4 11:33
 * @description:
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class SuppilerServiceImpl implements SuppilerService {
    @Resource
    private SupplierMapper supplierMapper;
    @Resource
    private DictionaryMapper dictionaryMapper;
    @Override
    public DataVo findAllsupper() {
        return null;
    }

    @Override
    public List<Supplier> selectAllot(Supplier supplier) {
        return supplierMapper.selectAllot(supplier);
    }


    @Override
    public void insert(Object object) {

    }

    @Override
    public void delete(Integer id) {

    }

    @Override
    public void delete(String ids) {

    }

    @Override
    public void update(Object object) {

    }

    @Override
    public Object findById(Integer id) {
        return supplierMapper.selectById(id);
    }

    @Override
    public List<Supplier> findAll() {
        return supplierMapper.selectAll();
    }

    @Override
    public List findAll(Object object) {
        return null;
    }

    @Override
    public PageInfo findPage(int pageNum) {
        return null;
    }

    @Override
    public PageInfo findPage() {
        return null;
    }

    @Override
    public PageInfo findPage(int pageNum, Object object) {
        return null;
    }

    @Override
    public PageInfo findPage(Object object) {
        return null;
    }

    @Override
    public List<Dictionary> select(Integer typeId) {

        return dictionaryMapper.selectByType(typeId);
    }

    @Override
    public int insertAll(Supplier supplier) {
        return supplierMapper.insert(supplier);
    }

    @Override
    public Supplier findSupplierByName(String name) {
        return supplierMapper.findSupplierByName(name);
    }
}
